﻿using System;
using System.Collections.Generic;
using System.Text;
using ITAP.ShprossesBuilder.Modelling.Components.Constraints;

namespace ITAP.ShprossesBuilder.Modelling.Components.Constraints
{
    public delegate void ComponentConstraintEventDelegate(IComponent sender, ComponentConstraintEventArgs e);

    public class ComponentConstraintEventArgs : EventArgs
    {        
        private UpdateState updateState = UpdateState.Unknown;

        public UpdateState UpdateState
        {
            get { return updateState; }
            set { updateState = value; }
        }

        private IConstraint failedConstraint = null;

        public IConstraint FailedConstraint
        {
            get { return failedConstraint; }
        }

        private bool cancelFixing = false;

        public bool CancelFixing
        {
            get { return cancelFixing; }
            set { cancelFixing = value; }
        }

        public ComponentConstraintEventArgs(IConstraint failedConstraint)
        {
            this.failedConstraint = failedConstraint;
        }
    }
}
